namespace Users {
    	using System;
    	
    	
    	/// <summary>
    	/// 表名：sso_AuthTicket 主键列：Token
    	/// </summary>
    	[SerializableAttribute()]
    	public partial class _AuthTicket : MySoft.Data.Entity {
    		
    		protected Guid _Token;
    		
    		protected String _Identity;
    		
    		protected DateTime _Expires;
    		
    		protected DateTime _CreationTime;
    		
    		public Guid Token {
    			get {
    				return this._Token;
    			}
    			set {
    				this.OnPropertyValueChange(_.Token, _Token, value);
    				this._Token = value;
    			}
    		}
    		
    		public String Identity {
    			get {
    				return this._Identity;
    			}
    			set {
    				this.OnPropertyValueChange(_.Identity, _Identity, value);
    				this._Identity = value;
    			}
    		}
    		
    		public DateTime Expires {
    			get {
    				return this._Expires;
    			}
    			set {
    				this.OnPropertyValueChange(_.Expires, _Expires, value);
    				this._Expires = value;
    			}
    		}
    		
    		public DateTime CreationTime {
    			get {
    				return this._CreationTime;
    			}
    			set {
    				this.OnPropertyValueChange(_.CreationTime, _CreationTime, value);
    				this._CreationTime = value;
    			}
    		}
    		
    		/// <summary>
    		/// 获取实体对应的表名
    		/// </summary>
    		protected override MySoft.Data.Table GetTable() {
    			return new MySoft.Data.Table<_AuthTicket>("sso_AuthTicket");
    		}
    		
    		/// <summary>
    		/// 获取实体中的主键列
    		/// </summary>
    		protected override MySoft.Data.Field[] GetPrimaryKeyFields() {
    			return new MySoft.Data.Field[] {
    					_.Token};
    		}
    		
    		/// <summary>
    		/// 获取列信息
    		/// </summary>
    		protected override MySoft.Data.Field[] GetFields() {
    			return new MySoft.Data.Field[] {
    					_.Token,
    					_.Identity,
    					_.Expires,
    					_.CreationTime};
    		}
    		
    		/// <summary>
    		/// 获取列数据
    		/// </summary>
    		protected override object[] GetValues() {
    			return new object[] {
    					this._Token,
    					this._Identity,
    					this._Expires,
    					this._CreationTime};
    		}
    		
    		/// <summary>
    		/// 给当前实体赋值
    		/// </summary>
    		protected override void SetValues(MySoft.Data.IRowReader reader) {
    			if ((false == reader.IsDBNull(_.Token))) {
    				this._Token = reader.GetGuid(_.Token);
    			}
    			if ((false == reader.IsDBNull(_.Identity))) {
    				this._Identity = reader.GetString(_.Identity);
    			}
    			if ((false == reader.IsDBNull(_.Expires))) {
    				this._Expires = reader.GetDateTime(_.Expires);
    			}
    			if ((false == reader.IsDBNull(_.CreationTime))) {
    				this._CreationTime = reader.GetDateTime(_.CreationTime);
    			}
    		}
    		
    		public override int GetHashCode() {
    			return base.GetHashCode();
    		}
    		
    		public override bool Equals(object obj) {
    			if ((obj == null)) {
    				return false;
    			}
    			if ((false == typeof(_AuthTicket).IsAssignableFrom(obj.GetType()))) {
    				return false;
    			}
    			if ((((object)(this)) == ((object)(obj)))) {
    				return true;
    			}
    			return false;
    		}
    		
    		public class _ {
    			
    			/// <summary>
    			/// 表示选择所有列，与*等同
    			/// </summary>
    			public static MySoft.Data.AllField All = new MySoft.Data.AllField<_AuthTicket>();
    			
    			/// <summary>
    			/// 字段名：Token - 数据类型：Guid
    			/// </summary>
    			public static MySoft.Data.Field Token = new MySoft.Data.Field<_AuthTicket>("Token");
    			
    			/// <summary>
    			/// 字段名：Identity - 数据类型：String
    			/// </summary>
    			public static MySoft.Data.Field Identity = new MySoft.Data.Field<_AuthTicket>("Identity");
    			
    			/// <summary>
    			/// 字段名：Expires - 数据类型：DateTime
    			/// </summary>
    			public static MySoft.Data.Field Expires = new MySoft.Data.Field<_AuthTicket>("Expires");
    			
    			/// <summary>
    			/// 字段名：CreationTime - 数据类型：DateTime
    			/// </summary>
    			public static MySoft.Data.Field CreationTime = new MySoft.Data.Field<_AuthTicket>("CreationTime");
    		}
    	}
    }
